import { Injectable } from '@angular/core';
import {HttpClient} from "@angular/common/http";
import {Observable} from "rxjs";
import {Ranking} from "../ranking/ranking";
import {News} from "./news";

@Injectable({
  providedIn: 'root'
})
export class NewsService {

  constructor(    private http: HttpClient
  ) { }

  url = "http://localhost:3000/news/getNews"

  getHttpNewsList(): Observable<News[]> {
    return this.http.get<News[]>(this.url)
  }
}
